import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx/common/utils/screen_adapter_util.dart';

import 'index.dart';

class HomePage extends GetView<HomeController> {
  const HomePage({super.key});

  // 主视图
  Widget _buildView() {
    return Center(
      child: InkWell(
        child: Text(
          "HomePage",
          style: TextStyle(fontSize: 16.rpx),
        ),
        onTap: () {
          controller.get_messege();
        },
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<HomeController>(
      init: HomeController(),
      id: "home",
      builder: (_) {
        return Scaffold(
          // appBar: AppBar(title: const Text("home")),
          body: SafeArea(
            child: _buildView(),
          ),
        );
      },
    );
  }
}
